import {
  createRouter,
  createWebHashHistory,
  createWebHistory,
} from "vue-router";
import Login from "../view/Login.vue";
import Home from "../view/Home.vue";
import SystemMonitor from "../view/SystemMonitor.vue";
import SystemConfig from "../view/SystemConfig.vue";
import SvgVue from "../view/SvgVue.vue";

const routes = [
  { path: "/", component: Login, name: "login" },
  {
    path: "/home",
    component: Home,
    children: [
      {
        path: "",
        component: SystemMonitor,
      },
      {
        path: "/systemmonitor",
        component: SystemMonitor,
        name: "SystemMonitor",
      },
      {
        path: "/systemconfig",
        component: SystemConfig,
        name: "SystemConfig",
      },
      {
        path: "/SvgVue",
        component: SvgVue,
        name: "SvgVue",
      },
    ],
  },
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
